﻿@using LY.Business.ServiceImpl
@using LY.Entity
@using LY.Entity.Entities
@using LY.Interface


@section htmlhead{
    <script src="~/Content/assets/DatePicker/WdatePicker.js"></script>
    <link href="~/Content/assets/css/Layout/css/main.css" rel="stylesheet" />
    <link href="~/Content/assets/css/plugin/validator.css" rel="stylesheet" />
}

@{
    ViewBag.Title = "公司认证";
    Layout = "~/Areas/Admin/Views/Shared/_LayoutCMS.cshtml";
    U_Company Company = new U_Company();
    if (ViewBag.Company != null)
    {
        Company = ViewBag.Company;
    }
    List<U_Companydocument> list = ViewBag.Companydocument;
    QJ.CMS.Areas.Admin.Controllers.CompanyController.rlist.Clear();//刷新页面时清除静态变量中缓存的值
}

<style>
    select {
        width: 210px;
    }

    #company tr td {
        width: 80px;
    }
</style>
<div class="container">

    <div id="forms" class="mt10">
        <div class="box">
            <div class="box_border">
                <div class="box_top"><b class="pl15">公司信息详情</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;带“ <span style="color: red">*</span> ”标示为必填项</div>
                <div class="box_center">
                    <form  id="frmEdit" method="post" action="@Url.Action("SaveCompanyCheck")" role="form" class="jqtransform">
                        <input type="hidden" id="MemberId" name="MemberId" value="@Company.MemberId"/>
                        <input type="hidden" id="Id" name="Id" value="@Company.Id"/>
                        <h4 style="margin-left: 15px">公司基本信息</h4>
                        <table id="company" class="form_table pt15 pb15" style="width: 100%;" border="0">

                            <!--必填区域-->
                            <tr>
                                <td><span style="color: red">*</span>&nbsp;公司名称：
                                   
                                </td>
                                <td>
                                    <input type="text" class="input normal" id="CompanyName" name="CompanyName"  value="@Company.CompanyName" datatype="*" nullmsg=" " sucmsg = " " errormsg =" "/>
                                </td>
                                <td><span style="color: red">*</span>&nbsp;注册资本(元)：
                                    
                                </td>
                                <td>
                                    <input type="text" class="input normal" id="Registercapital" name="Registercapital"  value="@Company.Registercapital" datatype="*" nullmsg=" " sucmsg = " " errormsg =" "/>
                                </td>
                            </tr>

                            <tr>
                                <td><span style="color: red">*</span>&nbsp;公司行业：   
                                   
                                </td>
                                <td>
                                    @Html.ResourceDropDownList("Industry", "Industry", @Company.Industry, new { @class = "wh200 select" })
                                </td>
                                <td><span style="color: red">*</span>&nbsp;公司性质：   
                                   
                                </td>
                                <td>
                                    @Html.ResourceDropDownList("Nature", "Nature", @Company.Nature, new { @class = "wh160 select" })
                                </td>
                            </tr>

                            <tr>


                                <td><span style="color: red">*</span>&nbsp;法人代表：
                                  
                                </td>
                                <td>
                                    <input type="text" class="input normal" id="Corporate" name="Corporate"  value="@Company.Corporate" datatype="*" nullmsg=" " sucmsg = " " errormsg =" "/>
                                </td>

                                <td><span style="color: red">*</span>&nbsp;成立日期：
                                  
                                </td>
                                <td>
                                    <input type="text" class="input normal" id="EstablishTime" name="EstablishTime" onclick = "WdatePicker();" value="@Company.EstablishTime" datatype="*" nullmsg=" " sucmsg = " " errormsg =" "/>
                                </td>
                            </tr>

                            <tr>
                                <td><span style="color: red">*</span>&nbsp;法人代表身份证号：
                                   
                                </td>
                                <td>
                                    <input type="text" class="input normal" id="CorporateIDCard" name="CorporateIDCard"  value="@Company.CorporateIDCard" datatype="idcard" nullmsg=" " sucmsg = " " errormsg =" "/>
                                </td>
                                <td><span style="color: red">*</span>&nbsp;法人代表手机号码：
                                   
                                </td>
                                <td>
                                    <input type="text" class="input normal" id="CorporateTel" name="CorporateTel"  value="@Company.CorporateTel" datatype="m" nullmsg=" " sucmsg = " " errormsg =" "/>
                                </td>
                            </tr>

                            <tr>
                                <td><span style="color: red">*</span>&nbsp;经营地址：
                                   
                                </td>
                                <td>
                                    <textarea class="input normal" id="ManageAdree" name="ManageAdree" datatype="*" nullmsg=" " sucmsg=" " errormsg=" ">@Company.ManageAdree</textarea>
                                </td>

                                <td><span style="color: red">*</span>&nbsp;注册地址：
                                   
                                </td>
                                <td>
                                    <textarea class="input normal" id="Adress" name="Adress" datatype="*" nullmsg=" " sucmsg=" " errormsg=" ">@Company.Adress</textarea>
                                </td>
                            </tr>
                            <tr>
                                <td><span style="color: red">*</span>&nbsp;联系人姓名：
                                  
                                </td>
                                <td>
                                    <input type="text" class="input normal" id="MemberName" name="MemberName"  value="@Company.MemberName" datatype="*" nullmsg=" " sucmsg = " " errormsg =" "/>
                                </td>
                                <td><span style="color: red">*</span>&nbsp;联系人电话：
                                   
                                </td>
                                <td>
                                    <input type="text" class="input normal" id="MemberTel" name="MemberTel"  value="@Company.MemberTel" datatype="*" nullmsg=" " sucmsg = " " errormsg =" "/>
                                </td>
                            </tr>

                            <!--可不填区域-->
                            <tr>
                                <td>公司邮编：  
                                </td>
                                <td>
                                    <input type="text" class="input normal" id="Postcode" name="Postcode"  value="@Company.Postcode" />
                                </td>
                                <td>单位传真：   
                                 
                                </td>
                                <td>
                                    <input type="text" class="input normal" id="Faxes" name="Faxes" value="@Company.Faxes" />
                                </td>
                            </tr>

                            <tr>
                                <td>公司网址：   
                                   
                                </td>
                                <td>
                                    <input type="text" class="input normal" id="URL" name="URL" value="@Company.Faxes" />
                                </td>
                                <td>E_mail：   
                                   
                                </td>
                                <td>
                                    <input type="text" class="input normal" id="Email" name="Email" value="@Company.Email" datatype="e" nullmsg=" " sucmsg = " " errormsg =" "/>
                                </td>
                            </tr>

                            <tr>
                                <td>ICP(ISP)证号：   
                                   
                                </td>
                                <td>
                                    <input type="text" class="input normal" id="ICP" name="ICP" value="@Company.ICP" />
                                </td>
                                <td>单位电话：   
                                 
                                </td>
                                <td>
                                    <input type="text" class="input normal" id="UnitTel" name="UnitTel" value="@Company.UnitTel" />
                                </td>
                            </tr>
                        </table>

                        <h4 style="margin-left: 15px">公司附件信息</h4>
                        <table class="form_table pt15 pb15" style="width: 100%;" border="0">

                            <tr>
                                <td style="width: 140px;">企业证件(四证)：</td>
                                <td>
                                    <div id="fileList1">
                                        @if (list != null)
                                        {
                                            for (var i = 0; i < list.Count; i++)
                                            {
                                            <div id="@list[i].Id" class="cp_img" >
                                                <img style="width: 91px;height: 91px" class="FangDaimg" src="@list[i].DocPath" />
                                            </div>
                                            }
                                        }
                                    </div>
                                </td>
                            </tr>

                        </table>
                        <input id="hid_pic" name="hid_pic" type="hidden" value="" />
                        <h4 style="margin-left: 15px">审核结果</h4>
                        <table class="form_table pt15 pb15" style="width: 100%;" border="0">
                            <tr>
                                <td class="td_right">审核状态：</td>
                                <td class="">
                                    @Html.ResourceRadioList("Status", "Status2", @Company.Status == 1 ? 3 : @Company.Status, true)
                                </td>
                            </tr>
                            <tr>
                                <td class="td_right">未通过原因：</td>
                                <td class="">
                                    <input type="text" id="Reason" name="Reason" value="@Company.Reason" class="input-text lh30" size="40">
                                </td>
                            </tr>

                            <tr>
                                <td class="td_right">&nbsp;</td>
                                <td class="">
                                    <input type="button" id="btnSave" name="button" class="btn btn82 btn_save2" value="保存">
                                    <input type="button" id="btnReturn" name="button" class="btn btn82 btn_res" value="返回">
                                </td>
                            </tr>
                        </table>

                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div>
</div>
@section jssection{

    <script type="text/javascript">
        var util = {};
        var options = {
            uploadUrl: "@Url.Action("UploadImg", "Helper")"
        };

    </script>
    <script src="~/Content/assets/plugins/validator/validator.js"></script>
    <script src="~/Content/assets/app/common/ajaxupload.js"></script>
    <script src="~/Content/assets/app/company/companyCheck.js"></script>



    <!-- 批量上传图片-->
    <link href="~/webuploader/css/webuploader.css" rel="stylesheet" />
    <link href="~/webuploader/css/style.css" rel="stylesheet" />
    <link href="~/webuploader/css/demo.css" rel="stylesheet" />

    <script src="~/webuploader/js/webuploader.js"></script>
    <script src="~/webuploader/ImageJS.js"></script>

    <script type="text/javascript">

        $(".FangDaimg").click(function () {
            var img = $(this).attr("src");
            var title = $(this).attr("title");
            $.dialog({
                id: 'a15',
                title: title,
                lock: true,
                content: '<img src="' + img + '" width="600"/>',
                padding: 0
            });
        });
        $(function () {
            //编辑器
            var url = "/Company/UpLoadProcess";
            upload("#fileList1", "#filePicker1", url, true); //相关文件

        })
    </script>

}